Optimal. Leaf size=116 \[ \frac{i (a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{i (a+i a \tan (c+d x))^m \, _2F_1(1,m;m+1;i \tan (c+d x)+1)}{d}-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.258574, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3561, 3600, 3481, 68, 3599, 65} \[ \frac{i (a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{i (a+i a \tan (c+d x))^m \, _2F_1(1,m;m+1;i \tan (c+d x)+1)}{d}-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3561
Rule 3600
Rule 3481
Rule 68
Rule 3599
Rule 65
Rubi steps
\begin{align*} \int \cot ^2(c+d x) (a+i a \tan (c+d x))^m \, dx &=-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d}+\frac{\int \cot (c+d x) (a+i a \tan (c+d x))^m (i a m-a (1-m) \tan (c+d x)) \, dx}{a}\\ &=-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d}+\frac{(i m) \int \cot (c+d x) (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^m \, dx}{a}-\int (a+i a \tan (c+d x))^m \, dx\\ &=-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d}+\frac{(i a) \operatorname{Subst}\left (\int \frac{(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}+\frac{(i a m) \operatorname{Subst}\left (\int \frac{(a+i a x)^{-1+m}}{x} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{\cot (c+d x) (a+i a \tan (c+d x))^m}{d}+\frac{i \, _2F_1\left (1,m;1+m;\frac{1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac{i \, _2F_1(1,m;1+m;1+i \tan (c+d x)) (a+i a \tan (c+d x))^m}{d}\\ \end{align*}
Mathematica [F] time = 20.9619, size = 0, normalized size = 0. \[ \int \cot ^2(c+d x) (a+i a \tan (c+d x))^m \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.579, size = 0, normalized size = 0. \begin{align*} \int \left ( \cot \left ( dx+c \right ) \right ) ^{2} \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{m}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \cot \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m}{\left (e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}}{e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \cot \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]